package com.dataeco.api.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "roles")
public class Roles implements Serializable{

    private static final long serialVersionUID=-6014041684645876748L;
    @Id
    private String id;
    private String code;
    private String name;
    private String remark;
    private Date createdAt;
    private Date modifiedAt;

    @OneToMany(mappedBy = "userRoleKey.dataecoRole")//???????
    private List<UsersRoles> dataecoRoleList =new ArrayList<>();

    public String getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getRemark() {
        return remark;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public Date getModifiedAt() {
        return modifiedAt;
    }

    public List<UsersRoles> getDataecoRoleList() {
        return dataecoRoleList;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public void setModifiedAt(Date modifiedAt) {
        this.modifiedAt = modifiedAt;
    }

    public void setDataecoRoleList(List<UsersRoles> dataecoRoleList) {
        this.dataecoRoleList = dataecoRoleList;
    }
}
